package Tank.text;

/**
 * @author qqq
 * @version 1.0
 * @date $(DATE)$(TIME)
 * @description
 */
        abstract class Tank {
        protected int attackPower; // 攻击力
        protected int health;      // 生命值
        protected int defense;     // 防御值
        protected double shootSpeed; // 射击速度
        protected double moveSpeed;  // 移动速度
        protected double destroyTime; // 销毁时间

        // 构造方法
        public Tank(int attackPower, int health, int defense, double shootSpeed, double moveSpeed, double destroyTime) {
            this.attackPower = attackPower;
            this.health = health;
            this.defense = defense;
            this.shootSpeed = shootSpeed;
            this.moveSpeed = moveSpeed;
            this.destroyTime = destroyTime;
        }

        // 射击方法
        public void shoot() {
            System.out.println(this.getClass().getSimpleName() + " is shooting with attack power " + attackPower + ".");
        }

        // 移动方法
        public void move() {
            System.out.println(this.getClass().getSimpleName() + " is moving at speed " + moveSpeed + ".");
        }

        // 死亡方法
        public abstract void die();
}
